package com.ribbon.impl.juc;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @Classname JucTest
 * @Description
 * @Date 2021/10/20 10:38
 * @Create by 杨涛
 */
public class JucTest {
    public static void main(String[] args) {
        AtomicInteger i=new AtomicInteger(0);
        for(;;){
            try {
                Thread.sleep(500);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println(i.getAndIncrement());
        }
    }
}
